HTMLModelElement
The HTMLModelElement
interface provides special properties (beyond the regular methods and properties available through the HTMLElement
interface they also have available to them by inheritance) for manipulating model elements, specified in HTML as <model>
.
Instance properties
Inherits properties from its parent, HTMLElement
.
HTMLModelElement.autoplay
- : A boolean value that reflects the
autoplay
HTML attribute, indicating whether playback should automatically begin as soon as the model has been loaded and parsed.
- : A boolean value that reflects the
HTMLModelElement.boundingBoxCenter
Read only- : a
DOMPointReadOnly
representing the center of the model asset's bounding box.
- : a
HTMLModelElement.boundingBoxExtents
Read only- : a
DOMPointReadOnly
representing the size of the model asset's bounding box.
- : a
HTMLModelElement.currentSrc
Read only- : A string with the absolute URL of the chosen model resource.
HTMLModelElement.currentTime
- : A double-precision floating-point value indicating the current playback time in seconds. The time is specified relative to the model's timeline.
HTMLModelElement.duration
Read only- : A read-only double-precision floating-point value indicating the total duration of the model's animation in seconds. If no animation is available, the returned value is
0
.
- : A read-only double-precision floating-point value indicating the total duration of the model's animation in seconds. If no animation is available, the returned value is
HTMLModelElement.entityTransform
- : a
DOMMatrixReadOnly
representing the current transformation matrix for the model's contents. It can be set to a newDOMMatrix
orDOMMatrixReadOnly
in order to change the current matrix.
- : a
HTMLModelElement.environmentMap
- : A string that reflects the
environmentmap
HTML attribute, which contains the full URL of the image including base URI. You can load a different image into the element by changing the URL in the src attribute.
- : A string that reflects the
HTMLModelElement.environmentMapReady
- : Returns a
Promise
indicating the first moment that the model's environmentMap resource has been parsed and is ready for contributing to rendering.
- : Returns a
HTMLModelElement.height
- : An integer value that reflects the
height
HTML attribute, indicating the vertical size of the viewport in CSS pixels.
- : An integer value that reflects the
HTMLModelElement.loop
-
: A boolean that reflects the
loop
HTML attribute, which indicates whether the model element's animation, if present, should start over when it reaches the end. HTMLModelElement.paused
Read only- : Returns a boolean that indicates whether the model element's animation, if present, is paused.
HTMLModelElement.playbackRate
- : A
double
that indicates the rate at which the model's animation, if present, is being played back.
- : A
HTMLModelElement.ready
- : a
Promise
indicating the first moment that the model resource has been parsed and is ready for rendering.
- : a
HTMLModelElement.stageMode
- : A string that reflects the
stagemode
HTML attribute, indicating the current stage mode of the model, which dictates the default mode for interpreting user interaction with the model.
- : A string that reflects the
HTMLModelElement.width
- : An integer value that reflects the
width
HTML attribute, indicating the horizontal size of the viewport in CSS pixels.
- : An integer value that reflects the
Instance methods
This interface also inherits methods from its ancestors HTMLElement
, Element
, Node
, and EventTarget
.
HTMLModelElement.pause()
-
Pauses the model element's animation playback.
HTMLModelElement.play()
-
Begins playback of the model element's animation, if present.
Specifications
No specification found
No specification data found for api.HTMLModelElement
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.